package itheima.zuoye.Test5;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        SeckillActivity activity = new SeckillActivity();

        // 展示秒杀活动商品
        System.out.println("秒杀活动商品列表：");
        for (Goods goods : activity.getGoodsList()) {
            System.out.println(goods);
        }

        // 用户选择抢购商品
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入要抢购的商品ID：");
        int goodsId = scanner.nextInt();
        System.out.print("请输入当前时间（格式为 HH:mm）：");
        String currentTime = scanner.next();

        // 用户抢购商品
        String result = activity.seckill(goodsId, currentTime);
        System.out.println(result);




    }
}
